<template>
	<view>
		<swiper id="pbpos" indicator-dots="true" indicator-color="rgba(255, 255, 255, .8)"
			indicator-active-color="#d81e06" autoplay="true">
			<swiper-item v-for="ban in blist" :key="ban.bid">
				<view class="swiper-item">
					<image :src="$server_pic+ban.bpic" mode="widthFix" class="swpic" />
				</view>
			</swiper-item>
		</swiper>
	</view>
</template>


<script>
	export default {
		name: "home-banner",
		data() {
			return {
				blist:[]
			};
		},
		created() {
			this.$request({
				url:'/banner/1/4',
				success:(res)=>{
					this.blist = res.data.records
				}
			})
		}
	}
</script>

<style>
	.swpic {
		width: 100%;
	}
</style>